QTPC 07 - QuickTime 2.0 Playback Memory Allocation
Title Banner


Technical Q&A's


QTPC 07 - QuickTime 2.0 Playback Memory Allocation (1-Aug-95)


Q When we play a large video (>3MB) on a Performa 460, a Performa 600, or a Power Mac 7100 (all running System7.5) using a controller, the memory in our application heap is fully consumed. We have to make repeated calls to MCIdle(movieController) to keep the movie playing, but we do not see a memory leak.

Some kind of caching appears to be taking place while the movie is playing. The memory consumed does not exceed our partition size, and we can play the movie over and over without ever running out of memory. This does not happen on Quadra CPUs (700, 840AV, etc.) running System 7.1 or 7.5.

Does QuickTime do some special kind of caching on slower Macs like the Performas? If so, is there an option we can set to force QuickTime to use a fixed buffer size?

A The application heap can be consumed when playing large QuickTime movies, but there is no reference in the documentation to any method of defining a fixed buffer size or to stopping the heap from filling up with redundant movie data.

We tested a simple Movie Controller-based QuickTime application using a movie file of approximately 6MB in size on a PowerBook 520 connected to an external monitor, a Power Mac 7100/80, and an LC III. ZoneRanger and Swatch were used to observe how the application heap changed during playback.

On all of these machines during playback, only the block of memory that contained the current section of the movie file currently playing was locked down in the heap, and any other space taken up by movie data was set as unlocked and purgeable. Therefore, if some of this space is required, PurgeMem(), or another of the memory manager routines that perform a similar task, can be called to dispose of the redundant data. The memory allocated during movie playback is released when the Movie is disposed of.

The buffer which is created by QuickTime when it's in the process of playing a movie cannot be set to a fixed size. QuickTime 2.0 was optimized to produce the highest possible frame rates on the entire Macintosh range. If it were possible to change the buffer size, the playback rate would probably suffer, and if a buffer of the default size was required by another part of QuickTime but was unavailable, it could cause incompatibilities.

If there isn't much memory available in the application using QuickTime, it doesn't use much. However, if there is sufficient memory available, QuickTime allocates all the caches and data structures that it requires to produce an optimal playback rate.

Technical Support
Technical Q&As
Previous Question | Contents | Next Question

Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help